$(document).ready(function () {
    // First, parse the query string
    var params = {}, queryString = location.hash.substring(1),
    regex = /([^&=]+)=([^&]*)/g, m;

    while (m = regex.exec(queryString)) {
	params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
    }

    $.ajax({
 	type:        'post',
	contentType: 'application/json; charset=utf-8',
	cache:       false,
	url:         '/process_google_auth',
	data:        JSON.stringify(params),
    });
});